
//
//  WillBeShownCollectionViewCell.m
//  代号：47
//
//  Created by lanou3g on 15/7/2.
//  Copyright (c) 2015年 杨佩璋. All rights reserved.
//

#import "WillBeShownCollectionViewCell.h"
#import <UIImageView+WebCache.h>

@implementation WillBeShownCollectionViewCell
-(void)dealloc{

    _model = nil;
    _imageView1 = nil;
    _label = nil;
    [super dealloc];
    


}

-(instancetype)initWithFrame:(CGRect)frame{

    self = [super initWithFrame:frame];
    if (self) {
        
        self.imageView1 = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)] autorelease];
        self.label = [[[UILabel alloc] initWithFrame:CGRectMake(0, self.frame.size.height - 30, self.frame.size.width, 30)] autorelease];
        
        _label.textColor = [UIColor whiteColor];
        _label.font = [UIFont boldSystemFontOfSize:13];
        _label.backgroundColor = [UIColor blackColor];
        _label.alpha = 0.5;
        
        [self.contentView addSubview:_imageView1];
        [_imageView1 addSubview:_label];
        
    }
    return self;

}
-(void)setModel:(WillBeShownModel *)model{
    if (_model != model) {
        [_model release];
        _model = [model retain];
    }
    
    [_imageView1 sd_setImageWithURL:[NSURL URLWithString:_model.large]];
    _label.text = _model.title;


}



@end
